home *** CD-ROM | disk | FTP | other *** search
/ EuroCD 3 / EuroCD 3.iso / Programming / Amos / AMOSList-0497 / AMOSLIST / text0171.txt < prev    next >
Encoding:
Text File  |  1998-06-24  |  1.6 KB  |  41 lines

  1. To All 
  2. Can someone help me with a small but irritating problem I am having
  3. with a little prog I am trying to get working.
  4. What I want to do is use AmosPro to create a file in Ram called Datapath
  5. and then execute it with Amiga dos.
  6. If you look at the example below it should create a file called Datapath
  7. containing "CD workbench:data".
  8. Now the hard part, the file should change the current directory to 
  9. workbench:data (which does exist on my system).
  10. But What I get is "object not found  CD failed returncode 20",
  11. I think I have found why it doesn't run because there seems to be extra
  12.  characters at the end of the file, I.e. the example below should create a file 
  13. 18 characters long including Return
  14. But the actual file is 20 long and its these extra characters that cause the 
  15. problem, If I load the file into a Text Editor and delete the invisible 
  16. characters at the end and resave the file  it runs fine.
  17. So the Question how do I create a file without the extra characters?
  18. I have tryed CHR$(13)/CHR$(10) After A$ but no luck. 
  19. And I can remove any extra characters easily inside Amos.
  20.  
  21. a$="workbench:data"
  22. C$="CD "
  23. A$=C$+A$
  24. Open Out 3,"Ram:Datapath"
  25. Print #3,A$
  26. Print #3,Chr$(13)
  27. Close 3
  28.  
  29. Any help would be appreciated
  30. Thanks Steve.
  31. end
  32. --
  33. ======== Stephen W Williams - stevewil@stevewil.demon.co.uk ========
  34. *AMIGA A1200 HD 2+24mb Ram - Blizzard 1230IV with SCSI - Ext Floppy*
  35. * Microvitec GPM1701 17" Monitor - SupraFAXmodem288 - SurfSquirrel *
  36. *  HiQ PowerStation-80+720Mb Quantum SCSI HDs ZIP Drive with AFS   *
  37. *     X2 CD Rom - HP DeskJet 693C - Power Mono Hand Scanner        *
  38. --
  39.  
  40.  
  41.